package thread.demo.arrayList;

import java.util.ArrayList;

public class ArrayListTest_Stack {
  public static void main(String[] args) {
    ArrayList<Integer> stack = new ArrayList<>();
    
    stack.add(1);
    stack.add(2);
    stack.add(3);
    
    System.out.println(stack.remove(stack.size() - 1));
    System.out.println(stack.remove(stack.size() - 1));
    System.out.println(stack.remove(stack.size() - 1));
  }
}
